<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>生产计划添加</title>
<script type="text/javascript" src="../js/jquery-1.8.2.js"></script>
<script type="text/javascript">
	function check(){
		var s=$('#pname').val();
		if(s.length>15||s.length==0){
			alert('计划名称1-15位！');
			return false;
		}
		var el=/^\d+\.?\d*$/;
		var m=$("#money").val();
		if(!el.test(m)){alert("成本请输入数字！"); return false;}
		return true;  
	}
</script>
<style type="text/css">
	div{margin:0px auto;width:500px;
	padding:0px 20px;font-size:20px;
	}
	body{background-color:#CCC;}
	input,select,textarea{font-size:18px;width:250px}
	.butt{width:100px;height:40px;}
	.butt:hover{background-color:#F96;cursor:pointer}
</style>

</head>

<body>
<div >
<h1 align="center">添加控制计划</h1>
	<form action="addsave" method="post" onsubmit="return check()">
	<table align="center" height="450px">
		<tr>
			<td align="right">计划名称：</td>
			<td><input id="pname" type="text" name="name"/></td>
		</tr><tr>
			<td align="right">计划完成时间：</td>
			<td><input type="date" name="otime"/></td>
		</tr><tr>
			<td align="right">计划内容：</td>
			<td><textarea name="content" rows="5" cols="46"/></textarea></td>
		</tr><tr>
			<td align="right">计划制定人：</td>
			<td><input type="text" value="${sessionScope.username }" name="maker"/></td>
		</tr><tr>
			<td align="right">计划状态：</td>
			<td><select name="statue">
				<option value="1">未开始</option>
				<option value="2">正在进行</option>
				<option value="3">已经结束</option>
			</select></td>
		</tr><tr>
			<td align="right">计划制定时间：</td>
			<td><input type="date" name="mtime"/></td>
		</tr><tr>
			<td align="right">总成本：</td>
			<td><input id="money" type="text" name="money"/></td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input class="butt" type="submit" value="添加"/>&nbsp;&nbsp;
				<input class="butt" type="reset" value="重置"/>
			</td>
		</tr>
	</table>
	</form>
	</div>
</body>
</html>